package com.jomoo.css.common.core.service;

import com.jomoo.css.common.core.dao.IDao;
import com.jomoo.css.common.core.support.DaoPage;
import org.hibernate.criterion.DetachedCriteria;

import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Map;


public interface IService<T> extends IEntityCommandBase {

    public IDao getDao();

    /**
     * @param datasetMap
     */
    void batchExecute(Map datasetMap);

    DaoPage pageBy(final DetachedCriteria detachedCriteria,
				   final int pageIndex, final int pageSize);

    List findBy(final DetachedCriteria criteria);

    List findBy(StringBuilder hql, Map params, Integer pageIndex, Integer pageSize);

    List findBy(StringBuilder hql, Map params);

    Long countBy(StringBuilder hql, Map params);

	<X, ID extends Serializable> X get(Class<X> domainClass, ID id);

    public Date getDatabaseServerDate();


}
